﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataModel;

namespace DataAccessUnitTest
{
    class Program
    {
        static void Main(string[] args)
        {
            // add new pattern template
            //using (var dbContext = new PatternDBContext())
            //{
            //    var patternTemplate = new PatternTemplate
            //    {
            //        Name = "Singleton",
            //        TemplateFile = "NA",
            //        SPCFile = "NA"
            //    };

            //    dbContext.PatternTemplates.Add(patternTemplate);
            //    dbContext.SaveChanges();
            //}
            IDataAccess patternService = new DataAccess();
            var patternTemplate = new PatternTemplate
            {
                Name = "Observer",
                //TemplateFile = "NA",
                //SPCFile = "NA"
            };
            //var patternTemplates = patternService.GetAllPatternTemplate();
            //Console.WriteLine(patternTemplates.Count());
            patternService.AddPatternTemplate(patternTemplate);
            Console.WriteLine("Done");
            Console.ReadLine();
        }
    }
}
